package com.xhwl.logistics.converter.mapstruct.logistics;

import com.xhwl.logistics.entity.approval.ApprovalNode;
import com.xhwl.logistics.vo.logistics.approval.ApprovalNodeVO;
import org.mapstruct.IterableMapping;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 *
 */
@Mapper(componentModel = "spring")
public interface ApprovalNodeConverter {

    ApprovalNodeConverter INSTANCE = Mappers.getMapper(ApprovalNodeConverter.class);

    ApprovalNode toPoConvert(ApprovalNodeVO source);

    ApprovalNodeVO toVoConvert(ApprovalNode po);

    @IterableMapping(elementTargetType = ApprovalNode.class)
    List<ApprovalNode> toPoConvertList(List<ApprovalNodeVO> source);

    @IterableMapping(elementTargetType = ApprovalNodeVO.class)
    List<ApprovalNodeVO> toVoConvertList(List<ApprovalNode> source);
}
